import random

# 生成 1000 个 0 到 100 内的随机整数
random_integers = [random.randint(0, 100) for _ in range(1000)]

# 统计每个元素的出现次数
count_dict = {}
for num in random_integers:
    if num in count_dict:
        count_dict[num] += 1
    else:
        count_dict[num] = 1
        
# 打印结果
for num, count in count_dict.items():
    print(f"元素 {num} 出现了 {count} 次")